import React,{ Component } from 'react'
import Login from "./components/Login";
import Register from "./components/Register";

class LoginForm extends Component {
    constructor(props) {
        super(props);
        this.state = {visible:true};
    }
    handleClick = ()=>{
        this.setState({
            visible: !this.state.visible
        })
    };
    render() {
        return (
            <div style={{ backgroundColor: "#f3f3f4",width:"100%",height:"100%" } }>
                {this.state.visible ? <Login onclick={this.handleClick} /> : <Register onclick={this.handleClick} />}
            </div>
      )
    }
  }

export default LoginForm;